package renguanyu.app.tools.controller;

import javafx.fxml.FXML;
import javafx.scene.control.Alert;
import javafx.scene.layout.BorderPane;
import renguanyu.app.tools.App;
import renguanyu.app.tools.util.FxmlUtl;

public class MainController {

	@FXML
	BorderPane root;

	@FXML
	public void textCompress() {
		root.setCenter(FxmlUtl.load("/view/TextCompressView.fxml"));
	}

	@FXML
	public void wordExtract() {
		root.setCenter(FxmlUtl.load("/view/WordExtractView.fxml"));
	}

	@FXML
	public void htmlToJs() {
		root.setCenter(FxmlUtl.load("/view/HtmlToJsView.fxml"));
	}

	@FXML
	public void headerToMap() {
		root.setCenter(FxmlUtl.load("/view/HeaderToMap.fxml"));
	}

	@FXML
	public void sqlToStringbuilder() {
		root.setCenter(FxmlUtl.load("/view/SqlToStringbuilderView.fxml"));
	}

	@FXML
	public void mavenjarToTarget() {
		root.setCenter(FxmlUtl.load("/view/MavenDependenciesToTarget.fxml"));
	}

	@FXML
	public void testUI() {
		root.setCenter(FxmlUtl.load("/view/TestUiView.fxml"));
	}

	@FXML
	public void dataCollect() {
		root.setCenter(FxmlUtl.load("/view/AnjukeDataCollectSecondHouseView.fxml"));
	}

	@FXML
	public void dataAnalyzeLineChart() {
		root.setCenter(FxmlUtl.load("/view/AnjukeDataAnalyzeLineChartView.fxml"));
	}

	@FXML
	public void dataAnalyzeTable() {
		root.setCenter(FxmlUtl.load("/view/AnjukeDataAnalyzeTableView.fxml"));
	}

	@FXML
	public void bhmsDataCollect() {
		root.setCenter(FxmlUtl.load("/view/BhmsDataCollectView.fxml"));
	}

	@FXML
	public void ablout() {
		StringBuilder headerText = new StringBuilder();
		headerText.append("作者：任冠宇 \n");
		headerText.append("QQ：651231292 \n");
		headerText.append("邮箱：guanyu.ren@aliyun.com");
		Alert alert = new Alert(Alert.AlertType.INFORMATION);
		alert.setTitle(App.getTitle());
		alert.initOwner(root.getScene().getWindow());
		alert.setHeaderText(headerText.toString());
		alert.show();
	}

}
